#include "product.h"
#include "abstractfactory.h"

int main()
{
    AFactory *f = new Factory1();
    AProductX *px = NULL;
    AProductY *py = NULL;

    px = f->CreateProductX();
    delete px;

    py = f->CreateProductY();
    delete py;

    delete f;
    f = new Factory2();

    px = f->CreateProductX();
    delete px;

    py = f->CreateProductY();
    delete py;

    return 0;
}

